home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / anthy.config < prev    next >
Encoding:
Text File  |  2010-05-23  |  1.3 KB  |  77 lines

  1. #!/bin/sh -e
  2.  
  3. . /usr/share/debconf/confmodule
  4.  
  5. METADICDIR=/usr/share/anthy/dic
  6. #ADDONDICDIR=/var/lib/anthy/
  7. DICLIST=/var/cache/anthy/diclist
  8. DICFILE=''
  9.  
  10. if [ ! -d /var/cache/anthy ]; then
  11.     mkdir -m 755 /var/cache/anthy
  12. fi
  13.  
  14. if [ -f $DICLIST ]; then
  15.     if [ -f "$DICLIST"-old ]; then
  16.         rm -f "$DICLIST-old"
  17.     fi
  18.     mv "$DICLIST" "$DICLIST-old"
  19. fi
  20.  
  21. cat << ENDOFLIST > $DICLIST
  22. 2ch.t
  23. base.t
  24. extra.t
  25. ENDOFLIST
  26.  
  27. #OLDDIR=`pwd`; cd $METADICDIR
  28. #for file in *; do
  29. #    case $file in
  30. #    *.t)
  31. #        if test -f $file; then
  32. #            echo $file >> $DICLIST
  33. #        fi
  34. #        ;;
  35. #    esac
  36. #done
  37. #cd $OLDDIR
  38.  
  39. #for file in $ADDONDICDIR/*; do
  40. #    case $file in
  41. #    *.t)
  42. #        if test -f $file; then
  43. #            DICFILE="$DICFILE\n$file"
  44. #        fi
  45. #    ;;
  46. #    esac
  47. #done
  48.  
  49. if [ -f "$DICLIST"-old ]; then
  50.     if diff -q "${DICLIST}"-old "${DICLIST}" > /dev/null 2>&1; then
  51.         # old file and new file are identical
  52.         rm -f "$DICLIST-old"
  53.     else
  54.         db_get anthy/reconf
  55.         if [ "$RET" = "true" ]; then
  56.             db_fset anthy/dictionaries seen false
  57.         fi
  58.     fi
  59. fi
  60.  
  61. DICS=$(sort -u "$DICLIST" | tr '\n' ' ' \
  62.       | sed 's/\ /,\ /g' | sed 's/,\ $//g')
  63.  
  64. db_capb backup
  65.  
  66. db_subst anthy/dictionaries dictionaries "$DICS"
  67.  
  68. while [ "$GO" != "ok" ]; do
  69.     db_input medium anthy/dictionaries || true
  70.     if db_go; then
  71.         GO=ok
  72.     fi
  73. done
  74.  
  75. db_input medium anthy/reconf || true
  76. db_go || true
  77.